/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fritadorcorrente.objetos;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/**
 *
 * @author manchini
 */
@Entity
public class Email implements Serializable {
    
    @Id
    private String email;
   
    @OneToMany(fetch=FetchType.EAGER)
    private Collection<Comentario> comentario = new ArrayList<Comentario>();

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return the mensagens
     */
    public Collection<Comentario> getMensagens() {
        return comentario;
    }

    /**
     * @param mensagens the mensagens to set
     */
    public void setMensagens(Collection<Comentario> mensagens) {
        this.comentario = mensagens;
    }
    
    
    
}
